home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 42
/
Amiga Format AFCD42 (Issue 126, Aug 1999).iso
/
-serious-
/
programming
/
arexx
/
rxcmanager
/
examples
/
cmanager_url.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1999-05-25
|
2KB
|
75 lines
/*
** $VER: CManager_URL.rexx 1.001 (25.04.99) © Simone Tellini
**
**
** FUNCTION:
** Searches URLS in CManager and copies them in GoldED
**
** $HISTORY:
**
** 25 Apr 1999 : 001.001 : By Giangi, adapted to GoldED v3 and modified a
** bit the output
**
*/
options results /* enable return codes */
if (left(address(), 6) ~= "GOLDED") then /* not started by GoldEd ? */
address 'GOLDED.1'
/* 'LOCK CURRENT RELEASE=4' */ /* lock GUI, gain access */
'LOCK CURRENT' /* lock GUI, gain access */
if (RC ~= 0) then exit
options failat 6 /* ignore warnings */
signal on syntax /* ensure clean exit */
/* ---------------------- INSERT YOUR CODE HERE ---------------------- */
if ~show("L","rxcmanager.library") then
if ~addlib("rxcmanager.library",0,-30) then do
say "no rxcmanager.library"
exit
end
'REQUEST STRING TITLE="Enter the pattern to search for:" VAR=K'
patt.Name = k
patt.WWW = k
patt.Comment = k
num = CMFind("USER WWW FTP","REC","PATT",1)
if num > 0 then do
do i=0 to num-1
'TEXT T="'rec.i.Type', "'
if rec.i.Type = 'FTP' then do
if rec.i.FTP ~= '' then 'TEXT T="ftp://'rec.i.FTP'"'
end
else do
if rec.i.WWW ~= '' then 'TEXT T="'rec.i.WWW'"'
end
'TEXT T=" ('rec.i.Name')"'
'CR'
'FIRST'
end
end
/* ------------------------- END OF YOUR CODE ------------------------ */
'UNLOCK' /* unlock GUI */
exit
SYNTAX:
SAY "Error in line" SIGL ":" ERRORTEXT(RC)
'UNLOCK'